package com.bandi.tharshesnows.model;

public enum SkirunDifficulty {

  /**
   * U - usoara
   */
  EASY("U"),
  /**
   * M - medie
   */
  MEDIUM("M"),
  /**
   * D - dificila
   */
  HARD("D"),
  /**
   * FU - foarte usoare
   */
  VERY_EASY("FU"), UNKNOWN("");

  private String difficultyText;

  private SkirunDifficulty(String difficultyText) {
    this.difficultyText = difficultyText;
  }

  public static SkirunDifficulty parse(String difficultyString) {
    for (SkirunDifficulty difficulty : values()) {
      if (difficulty.difficultyText.equals(difficultyString.toUpperCase())) {
        return difficulty;
      }
    }
    return null;
  }

}
